package com.jade.shoesmallinterface.controller;

import com.jade.shoesmallinterface.entity.ProductImage;
import com.jade.shoesmallinterface.entity.Result;
import com.jade.shoesmallinterface.service.productImageService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/shoes/image")
public class ProductImageController {
    @Resource
    private productImageService productImageService;

    /**
     * 查询对应商品id的图片信息
     * @return 用户信息列表
     */
    @GetMapping("/selectImageByProductId")
    public Result<List<ProductImage>> selectImageByProductId(Integer productId) {

        List<ProductImage> ProImages= productImageService.selectImageByProductId(productId);

        return Result.success(ProImages);

    }
}
